<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 想要获取a页面里的num数据
        // 获取地址栏后的querystring参数
        console.log(window.location.search);  // ?num=100
        var str = window.location.search;
        var num = str.split("=")[1];
        // console.log(num);
        var h1Ele = document.createElement("h1");
        h1Ele.innerHTML  = num;
        document.body.appendChild(h1Ele);


    </script>
</body>
</html>